home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 2 / CU Amiga Magazine's Super CD-ROM 02 (1996)(EMAP Images)(GB)[!][issue 1996-04].iso / magazine / amiga_e / e_v3.2a_extras / rexx / ecompile.ced next >
Text File  |  1994-11-09  |  809b  |  38 lines

  1. /* Ecompile.rexx: run E compiler from ced.
  2.    thanks to Rick Younie for improvements. */
  3.  
  4. epath = 'e:bin/'                    /* homedir of EC */
  5.  
  6. OPTIONS RESULTS
  7. ADDRESS COMMAND
  8.  
  9. IF ~EXISTS('ram:ec') THEN 'copy 'epath'ec ram:'    /* for slow sys: devices */
  10.  
  11. ADDRESS 'rexx_ced'
  12.  
  13. 'status 19'                    /* ask ced filename */
  14. file = result
  15.  
  16. 'status 18'
  17. IF result ~= 0 THEN DO                /* save if changed */
  18.   'save' file
  19.   SAY 'saving changes..'
  20. END
  21. ELSE SAY 'no changes..'
  22.  
  23. PARSE VAR file comparg '.e'            /* strip the extension */
  24. SAY 'invoking E compiler with file' comparg'.e'
  25.  
  26. ADDRESS
  27. OPTIONS FAILAT 1000000
  28. 'ram:ec -E' comparg                /* run compiler */
  29. ebyte = rc
  30.  
  31. IF EXISTS(comparg) THEN comparg            /* run exe */
  32.  
  33. ADDRESS
  34. pull                        /* wait for a <cr> */
  35. 'cedtofront'
  36. IF ebyte>0 THEN 'jump to byte' ebyte        /* jump to spot of error */
  37. exit 0
  38.